package view;

import java.awt.Component;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ResourceBundle;
import java.util.Scanner;

import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;
import controller.LoadFileListener;

/**
 * 
 * @author Andrea Scripa
 * 
 */
public class Load {
	ResourceBundle myAcceptedTypes = ResourceBundle
			.getBundle("resources.slogoMultimedia");
	ResourceBundle myErrors = ResourceBundle
			.getBundle("resources.errorMessages");
	private String input = "";
	
	public Load(){
	}

	public void execute() {
		JFileChooser chooser = new JFileChooser();
		chooser.addActionListener(new LoadFileListener(chooser));
		FileNameExtensionFilter filter = new FileNameExtensionFilter(
				myAcceptedTypes.getString("LoadFileFilter"), myAcceptedTypes
						.getString("AcceptedLoadType"));
		chooser.setFileFilter(filter);

		Component parent = null;
		int returnVal = chooser.showOpenDialog(parent);
		if (returnVal == JFileChooser.APPROVE_OPTION) {

		}
	}

	public String getFileText() {
		return input;
	}

}
